<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

class MachineSlots extends Model
{
    protected $table='machine_slots';
    /**
     * 指定时间字符
     *
     * @param  DateTime|int  $value
     * @return string
     */
    public function fromDateTime($value)
    {
        return strtotime(parent::fromDateTime($value));
    }

    public function goods(){
        return $this->hasOne('App\Model\Goods', 'id', 'good_id');
    }
}
